﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="category.aspx.cs" Inherits="BabyShop.CP.Category" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    td
    {
    	padding:10px;
    }
    input
    {
    	vertical-align:baseline;
    }   
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <div class="boxed widget-container widget_categories" style="padding:20px">           
   <asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox><br/><br/>
   <span class="btn btn-small gradient">
    <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" 
           style="outline: medium none;" onclick="btnSearch_Click"></asp:Button>  
   </span>  
   <div class="inner">      
    <asp:GridView ID="GridView" runat="server"    
        CellPadding="4" HeaderStyle-Height="20px" ShowFooter="true"
        ForeColor="Black" GridLines="Horizontal" AutoGenerateColumns="False" 
           AllowPaging="True" Width="80%" DataKeyNames="id" BackColor="White" 
           BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
           onrowdeleting="GridView_RowDeleting" onrowediting="GridView_RowEditing" 
           onpageindexchanging="GridView_PageIndexChanging" 
           onrowcancelingedit="GridView_RowCancelingEdit" 
           onrowupdating="GridView_RowUpdating" onrowcommand="GridView_RowCommand">
        <Columns>                   
            <asp:TemplateField HeaderText="Mã" InsertVisible="false">
                <EditItemTemplate>
                    <asp:Label ID="lbID" runat="server" Text='<%# Eval("id") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lbID" runat="server" Text='<%# Eval("id") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>            
            <asp:TemplateField HeaderText="Tên">
                <EditItemTemplate>
                    <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("name") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate> 
                    <asp:TextBox ID="txtNewName" runat="server"></asp:TextBox> 
                </FooterTemplate> 
                <ItemTemplate>
                    <asp:Label ID="lbName" runat="server" Text='<%# Bind("name") %>'></asp:Label>
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Sửa chữa" ShowHeader="False" HeaderStyle-HorizontalAlign="Left"> 
                <EditItemTemplate>
                    <span class="btn btn-small gradient btn-green"> 
                    <asp:LinkButton ID="lbkUpdate" runat="server" CausesValidation="True" CommandName="Update" Text="<span>Cập nhật</span>"></asp:LinkButton> 
                    </span>
                    <span class="btn btn-small gradient btn-green">
                    <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="<span>Hủy</span>"></asp:LinkButton> 
                    </span>
                </EditItemTemplate> 
                <FooterTemplate>
                    <span class="btn btn-small gradient btn-green">
                    <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="False" CommandName="Insert" Text="<span>Thêm</span>"></asp:LinkButton> 
                    </span> 
                </FooterTemplate> 
                <ItemTemplate>
                    <span class="btn btn-small gradient btn-green"> 
                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" Text="<span>Sửa</span>"></asp:LinkButton> 
                    </span>
                </ItemTemplate> 
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Xóa">
                <ItemTemplate>
                   <span class="btn btn-small gradient btn-warning">
                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="Delete" Text="<span>Xóa</span>" OnClientClick="return confirm('Bạn có muốn xóa loại trò chơi này không?')"></asp:LinkButton> 
                    </span>
                </ItemTemplate>
            </asp:TemplateField>            
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F7F7F7" />
        <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
        <SortedDescendingCellStyle BackColor="#E5E5E5" />
        <SortedDescendingHeaderStyle BackColor="#242121" />
    </asp:GridView>
    </div>
    <div style="color:Red">
       <asp:Label ID="lblMsg" runat="server"></asp:Label>
    </div>
</div>
</asp:Content>
